package cn.wolfcode.wolf2w.controller;

import cn.wolfcode.wolf2w.service.ISpotService;
import cn.wolfcode.wolf2w.service.IRegionService;
import cn.wolfcode.wolf2w.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 目的地的操作
 * regionService  区域
 * spotService  目的地
 */
@RestController
@RequestMapping("/spots")
public class SpotController {

    @Autowired
    private ISpotService spotService;

    @GetMapping("/list")
    public Object list(){
        return JsonResult.success(spotService.list());
    }

}
